---
title: "cp_claimprofile_get_group_policy_list stored procedure documentation"
summary: "Analysis of the cp_claimprofile_get_group_policy_list SQL Server (BDS) stored procedure including business rules and operations."
status: draft
owner: "SAIF Corporation"
last_reviewed: 2026-08-31
source_schema: "eisD0P11.dbo"
source_name: "cp_claimprofile_get_group_policy_list"
source_type: "PROCEDURE"
retrieval_status: "found"
retrieval_command: "legends sqlserver query --name cp_claimprofile_get_group_policy_list"
retrieval_date: "2026-08-31"
---

# cp_claimprofile_get_group_policy_list

## Overview

| Field | Value |
| --- | --- |
| **Schema** | `eisD0P11.dbo` |
| **Type** | SQL Server stored procedure (BDS) |
| **Database** | SQL Server (`eisD0P11`, referred to internally as "BDS") |
| **Status** | ✅ `found` — retrieved via Legends CLI |
| **Query executed** | `legends sqlserver query --name cp_claimprofile_get_group_policy_list` |
| **Calling libraries** | `SAIF.Business.View.Policy` |
| **Calling classes** | `clsPolicySecurity` |

## Purpose

`cp_claimprofile_get_group_policy_list` returns the policy list visible to a group/chapter as of a
report date, used by `clsPolicySecurity.GetPolicyListforGroup`.

## Procedures / Methods

### cp_claimprofile_get_group_policy_list

| Field | Value |
| --- | --- |
| **Returns** | `procID`, `GroupParent`, `groupKey`, `grpChap`, `policy_number`, `policy_name` (branch 1 also `acronym`, `sub`) |
| **Called by** | `clsPolicySecurity.GetPolicyListforGroup` (`clsPolicySecurity.vb:286-311`) |

**Description:** Normalises the report date and applies the same `@UseSql` variant triage as
`cp_policy_in_group`, restricting the result to active policies with an unexpired group membership and
qualifying period, and rendering the placeholder chapter code `NC` as blank (see rules PR-BVP-049
through PR-BVP-052 in [Business Rules](#business-rules) below).

#### Parameters

| Parameter | Direction | Type | Default | Description |
| --- | --- | --- | --- | --- |
| `@GroupKeyCode` | IN | `varchar(10)` | — | Group key code |
| `@SpecificChapterCode` | IN | `varchar(10)` | — | Chapter code |
| `@rptDate` | IN | `datetime` | — | Report/as-of date |

## Business Rules

Rules extracted from this procedure's logic:

| Rule ID | Rule | Condition | Action |
| --- | --- | --- | --- |
| PR-BVP-049 | The report date is normalised to a date without time | always | `convert(char, @rptDate, 101)` |
| PR-BVP-050 | A policy period qualifies if it is the most recent covered period, or the last period in the group still within the report window | `MOST_RECENT_PP_COV_FL = 'Y'` OR (`LST_PLCY_PD_IN_GRP_FL = 'Y'` AND `plcy_pd_lst_cov_dt >= @rptDate` AND `GRP_MBRSHP_EXP_DT >= @rptDate`) | Include the policy |
| PR-BVP-051 | Only active policies with unexpired group membership are listed | `wp.ACTV_PLCY_FL = 'Y'` AND `pd_sum.GRP_MBRSHP_EXP_DT >= @rptDate` | Include the policy |
| PR-BVP-052 | The placeholder chapter code `NC` is not shown to users | `CHAP_CD = 'NC'` | Render as a blank string |

> These rules are documented in [business-rules.md](../business-rules.md).

## Operations

Operations and processes implemented in this procedure:

| Operation | Description | Trigger |
| --- | --- | --- |
| List group policies | Returns the policy list visible to a group/chapter as of a report date | `clsPolicySecurity.GetPolicyListforGroup` (`clsPolicySecurity.vb:286-311`) |

> These operations are also listed in [operations-processes.md](../operations-processes.md) with source reference back to this document.

## Source Code

<details>
<summary>Transact-SQL stored procedure</summary>

```sql
CREATE PROCEDURE dbo.cp_claimprofile_get_group_policy_list
    @GroupKeyCode        varchar(10),
    @SpecificChapterCode varchar(10),
    @rptDate             datetime
AS
SELECT @rptDate = convert(char, @rptDate, 101)   -- strip time

-- same @UseSql 1/2/3 triage as cp_policy_in_group
-- common predicates:
--   (pd.MOST_RECENT_PP_COV_FL = 'Y'
--     OR (pd.LST_PLCY_PD_IN_GRP_FL = 'Y'
--         AND pd.plcy_pd_lst_cov_dt   >= @rptDate
--         AND ps.GRP_MBRSHP_EXP_DT    >= @rptDate))
--   AND wp.ACTV_PLCY_FL = 'Y'
--   AND ps.GRP_MBRSHP_EXP_DT >= @rptDate
-- returns: procID, GroupParent, groupKey, grpChap, policy_number, policy_name
--          (branch 1 also acronym, sub)
-- CHAP_CD = 'NC' is rendered as ''
```

</details>

## Related Documentation
- [Procedure catalog](index.md)
- [Business rules](../business-rules.md)
- [Operations and processes](../operations-processes.md)
- [SQL catalog](../sql/index.md)

## Sources
- SQL Server BDS source: `eisD0P11.dbo.cp_claimprofile_get_group_policy_list`
- Legends CLI query executed 2026-08-31: `legends sqlserver query --name cp_claimprofile_get_group_policy_list`
- Calling code: `SAIF.Business.View.Policy/clsPolicySecurity.vb:286-311`
